package com.city.project.service.impl;

import com.city.project.factory.DaoFactory;
import com.city.project.model.Room;
import com.city.project.service.IRoomService;

import java.util.List;

public class RoomServiceImpl implements IRoomService {
    @Override
    public List<Room> getList(String number) {
        return DaoFactory.getRoomDao().getList(number);
    }

    @Override
    public Room getOne(int id) {
        return DaoFactory.getRoomDao().getOne(id);
    }

    @Override
    public void add(Room room) {
        DaoFactory.getRoomDao().add(room);
    }

    @Override
    public void update(Room room) {
        DaoFactory.getRoomDao().update(room);
    }

    @Override
    public void delete(int id) {
        DaoFactory.getRoomDao().delete(id);
    }
}
